/**
 * 计算数据的js
 */
/**===============================================order提供跟踪号、流量、加入愿望清单=========start==================================================*/
/*站点*/
var siteId = $("input[name='siteId']");
//产品代付数量
var proNum = $("input[name='proNum']");
//总额
var rentalNum = $("input[name='rentalNum']");
//代购手续费总额
var procedureNum = $("input[name='procedureNum']");
//总支付金额
var payNum = $("input[name='payNum']");
//产品价格
var pro_price = $("input[name='pro_price']");
//运费
var p_price = $("input[name='p_price']");
//order提供跟踪号（加2元）选择框
var order = $("input[name='order']");
//流量选择框
var flow = $("input[name='flow']");
//加入愿望清单选择框
var wish = $("input[name='wish']");
//加入购物车并收藏页面选择框
var cart = $("input[name='cart']");

/**
 * order提供跟踪号--超级链接
 */
var order_url_one_day = $("input[name='order_url_one_day']");
var order_url_two_day = $("input[name='order_url_two_day']");
var order_url_three_day = $("input[name='order_url_three_day']");
var order_url_four_day = $("input[name='order_url_four_day']");
var order_url_five_day = $("input[name='order_url_five_day']");
var order_url_six_day = $("input[name='order_url_six_day']");
var order_url_seven_day = $("input[name='order_url_seven_day']");
var order_url_eight_day = $("input[name='order_url_eight_day']");
var order_url_nine_day = $("input[name='order_url_nine_day']");
var order_url_ten_day = $("input[name='order_url_ten_day']");
/*超级链接--单笔手续费*/
var order_url_charge = $("input[name='order_url_charge']");
/*超级链接--总数量*/
var order_url_day_sun = $("input[name='order_url_day_sun']");
/*超级链接--总手续费*/
var order_url_sun = $("input[name='order_url_sun']");

/**
 * 流量---超级链接
 */
var flow_url_one_day = $("input[name='flow_url_one_day']");
var flow_url_two_day = $("input[name='flow_url_two_day']");
var flow_url_three_day = $("input[name='flow_url_three_day']");
var flow_url_four_day = $("input[name='flow_url_four_day']");
var flow_url_five_day = $("input[name='flow_url_five_day']");
var flow_url_six_day = $("input[name='flow_url_six_day']");
var flow_url_seven_day = $("input[name='flow_url_seven_day']");
var flow_url_eight_day = $("input[name='flow_url_eight_day']");
var flow_url_nine_day = $("input[name='flow_url_nine_day']");
var flow_url_ten_day = $("input[name='flow_url_ten_day']");
/*超级链接--单笔手续费*/
var flow_url_charge = $("input[name='flow_url_charge']");
/*超级链接--总数量*/
var flow_url_day_sun = $("input[name='flow_url_day_sun']");
/*超级链接--总手续费*/
var flow_url_sun = $("input[name='flow_url_sun']");
/**====目标转换率====*/
var crate = $("input[name='crate']");

/**
 * 流量---搜索结果
 */
var flow_result_one_day = $("input[name='flow_result_one_day']");
var flow_result_two_day = $("input[name='flow_result_two_day']");
var flow_result_three_day = $("input[name='flow_result_three_day']");
var flow_result_four_day = $("input[name='flow_result_four_day']");
var flow_result_five_day = $("input[name='flow_result_five_day']");
var flow_result_six_day = $("input[name='flow_result_six_day']");
var flow_result_seven_day = $("input[name='flow_result_seven_day']");
var flow_result_eight_day = $("input[name='flow_result_eight_day']");
var flow_result_nine_day = $("input[name='flow_result_nine_day']");
var flow_result_ten_day = $("input[name='flow_result_ten_day']");
/*搜索结果--单笔手续费*/
var flow_result_charge = $("input[name='flow_result_charge']");
/*搜索结果--总数量*/
var flow_result_day_sun = $("input[name='flow_result_day_sun']");
/*搜索结果--总手续费*/
var flow_result_sun = $("input[name='flow_result_sun']");


/**
 * 加入愿望清单---超级链接
 */
var wish_url_one_day = $("input[name='wish_url_one_day']");
var wish_url_two_day = $("input[name='wish_url_two_day']");
var wish_url_three_day = $("input[name='wish_url_three_day']");
var wish_url_four_day = $("input[name='wish_url_four_day']");
var wish_url_five_day = $("input[name='wish_url_five_day']");
var wish_url_six_day = $("input[name='wish_url_six_day']");
var wish_url_seven_day = $("input[name='wish_url_seven_day']");
var wish_url_eight_day = $("input[name='wish_url_eight_day']");
var wish_url_nine_day = $("input[name='wish_url_nine_day']");
var wish_url_ten_day = $("input[name='wish_url_ten_day']");
/*超级链接--单笔手续费*/
var wish_url_charge = $("input[name='wish_url_charge']");
/*超级链接--总数量*/
var wish_url_day_sun = $("input[name='wish_url_day_sun']");
/*超级链接--总手续费*/
var wish_url_sun = $("input[name='wish_url_sun']");
/**====加入愿望清单--比率====*/
var wishRate = $("input[name='wishRate']");

/**
 * 加入愿望清单---搜索结果
 */
var wish_result_one_day = $("input[name='wish_result_one_day']");
var wish_result_two_day = $("input[name='wish_result_two_day']");
var wish_result_three_day = $("input[name='wish_result_three_day']");
var wish_result_four_day = $("input[name='wish_result_four_day']");
var wish_result_five_day = $("input[name='wish_result_five_day']");
var wish_result_six_day = $("input[name='wish_result_six_day']");
var wish_result_seven_day = $("input[name='wish_result_seven_day']");
var wish_result_eight_day = $("input[name='wish_result_eight_day']");
var wish_result_nine_day = $("input[name='wish_result_nine_day']");
var wish_result_ten_day = $("input[name='wish_result_ten_day']");
/*搜索结果--单笔手续费*/
var wish_result_charge = $("input[name='wish_result_charge']");
/*搜索结果--总数量*/
var wish_result_day_sun = $("input[name='wish_result_day_sun']");
/*搜索结果--总手续费*/
var wish_result_sun = $("input[name='wish_result_sun']");


/**
 * 加入购物车并收藏页面---超级链接
 */
var cart_url_one_day = $("input[name='cart_url_one_day']");
var cart_url_two_day = $("input[name='cart_url_two_day']");
var cart_url_three_day = $("input[name='cart_url_three_day']");
var cart_url_four_day = $("input[name='cart_url_four_day']");
var cart_url_five_day = $("input[name='cart_url_five_day']");
var cart_url_six_day = $("input[name='cart_url_six_day']");
var cart_url_seven_day = $("input[name='cart_url_seven_day']");
var cart_url_eight_day = $("input[name='cart_url_eight_day']");
var cart_url_nine_day = $("input[name='cart_url_nine_day']");
var cart_url_ten_day = $("input[name='cart_url_ten_day']");
/*超级链接--单笔手续费*/
var cart_url_charge = $("input[name='cart_url_charge']");
/*超级链接--总数量*/
var cart_url_day_sun = $("input[name='cart_url_day_sun']");
/*超级链接--总手续费*/
var cart_url_sun = $("input[name='cart_url_sun']");
/**====加入购物车并收藏页面--比率====*/
var cartRate = $("input[name='cartRate']");

/**
 * 加入购物车并收藏页面---搜索结果
 */
var cart_result_one_day = $("input[name='cart_result_one_day']");
var cart_result_two_day = $("input[name='cart_result_two_day']");
var cart_result_three_day = $("input[name='cart_result_three_day']");
var cart_result_four_day = $("input[name='cart_result_four_day']");
var cart_result_five_day = $("input[name='cart_result_five_day']");
var cart_result_six_day = $("input[name='cart_result_six_day']");
var cart_result_seven_day = $("input[name='cart_result_seven_day']");
var cart_result_eight_day = $("input[name='cart_result_eight_day']");
var cart_result_nine_day = $("input[name='cart_result_nine_day']");
var cart_result_ten_day = $("input[name='cart_result_ten_day']");
/*搜索结果--单笔手续费*/
var cart_result_charge = $("input[name='cart_result_charge']");
/*搜索结果--总数量*/
var cart_result_day_sun = $("input[name='cart_result_day_sun']");
/*搜索结果--总手续费*/
var cart_result_sun = $("input[name='cart_result_sun']");


$(function() {
	siteId.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	pro_price.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	p_price.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});

	order.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	
	flow.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	wish.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	cart.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	
	order_url_one_day.change(function() {
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	order_url_two_day.change(function() {
		sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
				wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	});
	order_url_three_day.change(function() {
		sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
				wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	});
	order_url_four_day.change(function() {
		sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
				wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	});
	order_url_five_day.change(function() {
		sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
				wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	});
	order_url_six_day.change(function() {
		sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
				wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	});
	order_url_seven_day.change(function() {
		sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
				wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	});
	order_url_eight_day.change(function() {
		sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
				wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	});
	order_url_nine_day.change(function() {
		sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
				wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	});
	order_url_ten_day.change(function() {
		sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
				wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	});
	order.change(function() {
		orderChange();
	});
	flow.change(function() {
		flowChange();
	});
	wish.change(function() {
		wishChange();
	});
	cart.change(function() {
		cartChange();
	});
	crate.change(function() {
		crateChange();
	});
	wishRate.change(function() {
		wishRateChange();
	});
	cartRate.change(function() {
		cartRateChange();
	});
	
});



/**
 * order提供跟踪号--搜索广告
 */
var order_ad_one_day = $("input[name='order_ad_one_day']");
var order_ad_two_day = $("input[name='order_ad_two_day']");
var order_ad_three_day = $("input[name='order_ad_three_day']");
var order_ad_four_day = $("input[name='order_ad_four_day']");
var order_ad_five_day = $("input[name='order_ad_five_day']");
var order_ad_six_day = $("input[name='order_ad_six_day']");
var order_ad_seven_day = $("input[name='order_ad_seven_day']");
var order_ad_eight_day = $("input[name='order_ad_eight_day']");
var order_ad_nine_day = $("input[name='order_ad_nine_day']");
var order_ad_ten_day = $("input[name='order_ad_ten_day']");
/*搜索广告--单笔手续费*/
var order_ad_charge = $("input[name='order_ad_charge']");
/*搜索广告--总数量*/
var order_ad_day_sun = $("input[name='order_ad_day_sun']");
/*搜索广告--总手续费*/
var order_ad_sun = $("input[name='order_ad_sun']");


$(function() {
	
	pro_price.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	
	p_price.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	siteId.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	/*order.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	flow.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	wish.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	cart.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});*/
	order_ad_one_day.change(function() {
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	order_ad_two_day.change(function() {
		sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
				wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	});
	order_ad_three_day.change(function() {
		sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
				wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	});
	order_ad_four_day.change(function() {
		sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
				wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	});
	order_ad_five_day.change(function() {
		sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
				wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	});
	order_ad_six_day.change(function() {
		sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
				wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	});
	order_ad_seven_day.change(function() {
		sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
				wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	});
	order_ad_eight_day.change(function() {
		sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
				wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	});
	order_ad_nine_day.change(function() {
		sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
				wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	});
	order_ad_ten_day.change(function() {
		sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
				wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	});
	order.change(function() {
		orderChange();
	});
	flow.change(function() {
		flowChange();
	});
	wish.change(function() {
		wishChange();
	});
	cart.change(function() {
		cartChange();
	});
	crate.change(function() {
		crateChange();
	});
	wishRate.change(function() {
		wishRateChange();
	});
	cartRate.change(function() {
		cartRateChange();
	});
	
	
});



/**
 * order提供跟踪号--搜索结果
 */
var order_result_one_day = $("input[name='order_result_one_day']");
var order_result_two_day = $("input[name='order_result_two_day']");
var order_result_three_day = $("input[name='order_result_three_day']");
var order_result_four_day = $("input[name='order_result_four_day']");
var order_result_five_day = $("input[name='order_result_five_day']");
var order_result_six_day = $("input[name='order_result_six_day']");
var order_result_seven_day = $("input[name='order_result_seven_day']");
var order_result_eight_day = $("input[name='order_result_eight_day']");
var order_result_nine_day = $("input[name='order_result_nine_day']");
var order_result_ten_day = $("input[name='order_result_ten_day']");
/*搜索结果--单笔手续费*/
var order_result_charge = $("input[name='order_result_charge']");
/*搜索结果--总数量*/
var order_result_day_sun = $("input[name='order_result_day_sun']");
/*搜索结果--总手续费*/
var order_result_sun = $("input[name='order_result_sun']");


$(function() {
	
	pro_price.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	
	p_price.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	siteId.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	/*order.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	flow.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	wish.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	cart.change(function(){
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});*/
	
	order_result_one_day.change(function() {
		sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
				wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	});
	order_result_two_day.change(function() {
		sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
				wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	});
	order_result_three_day.change(function() {
		sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
				wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	});
	order_result_four_day.change(function() {
		sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
				wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	});
	order_result_five_day.change(function() {
		sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
				wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	});
	order_result_six_day.change(function() {
		sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
				wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	});
	order_result_seven_day.change(function() {
		sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
				wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	});
	order_result_eight_day.change(function() {
		sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
				wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	});
	order_result_nine_day.change(function() {
		sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
				wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	});
	order_result_ten_day.change(function() {
		sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
				wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	});
	
	order.change(function() {
		orderChange();
	});
	flow.change(function() {
		flowChange();
	});
	wish.change(function() {
		wishChange();
	});
	cart.change(function() {
		cartChange();
	});
	crate.change(function() {
		crateChange();
	});
	wishRate.change(function() {
		wishRateChange();
	});
	cartRate.change(function() {
		cartRateChange();
	});
	
});

//流量--加减
$(function() {
	flow_url_one_day.change(function () {
		changeNum(order_url_one_day.val(),order_ad_one_day.val(),order_result_one_day.val(),
				crate.val(),flow_url_one_day,flow_result_one_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_one_day.change(function () {
		changeNum(order_url_one_day.val(),order_ad_one_day.val(),order_result_one_day.val(),
				crate.val(),flow_result_one_day,flow_url_one_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_url_two_day.change(function () {
		changeNum(order_url_two_day.val(),order_ad_two_day.val(),order_result_two_day.val(),
				crate.val(),flow_url_two_day,flow_result_two_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_two_day.change(function () {
		changeNum(order_url_two_day.val(),order_ad_two_day.val(),order_result_two_day.val(),
				crate.val(),flow_result_two_day,flow_url_two_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_url_three_day.change(function () {
		changeNum(order_url_three_day.val(),order_ad_three_day.val(),order_result_three_day.val(),
				crate.val(),flow_url_three_day,flow_result_three_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_three_day.change(function () {
		changeNum(order_url_three_day.val(),order_ad_three_day.val(),order_result_three_day.val(),
				crate.val(),flow_result_three_day,flow_url_three_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_url_four_day.change(function () {
		changeNum(order_url_four_day.val(),order_ad_four_day.val(),order_result_four_day.val(),
				crate.val(),flow_url_four_day,flow_result_four_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_four_day.change(function () {
		changeNum(order_url_four_day.val(),order_ad_four_day.val(),order_result_four_day.val(),
				crate.val(),flow_result_four_day,flow_url_four_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_url_five_day.change(function () {
		changeNum(order_url_five_day.val(),order_ad_five_day.val(),order_result_five_day.val(),
				crate.val(),flow_url_five_day,flow_result_five_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_five_day.change(function () {
		changeNum(order_url_five_day.val(),order_ad_five_day.val(),order_result_five_day.val(),
				crate.val(),flow_result_five_day,flow_url_five_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_url_six_day.change(function () {
		changeNum(order_url_six_day.val(),order_ad_six_day.val(),order_result_six_day.val(),
				crate.val(),flow_url_six_day,flow_result_six_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_six_day.change(function () {
		changeNum(order_url_six_day.val(),order_ad_six_day.val(),order_result_six_day.val(),
				crate.val(),flow_result_six_day,flow_url_six_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_url_seven_day.change(function () {
		changeNum(order_url_seven_day.val(),order_ad_seven_day.val(),order_result_seven_day.val(),
				crate.val(),flow_url_seven_day,flow_result_seven_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_seven_day.change(function () {
		changeNum(order_url_seven_day.val(),order_ad_seven_day.val(),order_result_seven_day.val(),
				crate.val(),flow_result_seven_day,flow_url_seven_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_url_eight_day.change(function () {
		changeNum(order_url_eight_day.val(),order_ad_eight_day.val(),order_result_eight_day.val(),
				crate.val(),flow_url_eight_day,flow_result_eight_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_eight_day.change(function () {
		changeNum(order_url_eight_day.val(),order_ad_eight_day.val(),order_result_eight_day.val(),
				crate.val(),flow_result_eight_day,flow_url_eight_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_url_nine_day.change(function () {
		changeNum(order_url_nine_day.val(),order_ad_nine_day.val(),order_result_nine_day.val(),
				crate.val(),flow_url_nine_day,flow_result_nine_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_nine_day.change(function () {
		changeNum(order_url_nine_day.val(),order_ad_nine_day.val(),order_result_nine_day.val(),
				crate.val(),flow_result_nine_day,flow_url_nine_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_url_ten_day.change(function () {
		changeNum(order_url_ten_day.val(),order_ad_ten_day.val(),order_result_ten_day.val(),
				crate.val(),flow_url_ten_day,flow_result_ten_day);
		flowUrlsun();
		flowResultsun();
	});
	flow_result_ten_day.change(function () {
		changeNum(order_url_ten_day.val(),order_ad_ten_day.val(),order_result_ten_day.val(),
				crate.val(),flow_result_ten_day,flow_url_ten_day);
		flowUrlsun();
		flowResultsun();
	});
	
});
//加入愿望清单--加减
$(function() {
	wish_url_one_day.change(function () {
		changeNumWC(order_url_one_day.val(),order_ad_one_day.val(),order_result_one_day.val(),
				crate.val(),wishRate.val(),wish_url_one_day,wish_result_one_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_one_day.change(function () {
		changeNumWC(order_url_one_day.val(),order_ad_one_day.val(),order_result_one_day.val(),
				crate.val(),wishRate.val(),wish_result_one_day,wish_url_one_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_url_two_day.change(function () {
		changeNumWC(order_url_two_day.val(),order_ad_two_day.val(),order_result_two_day.val(),
				crate.val(),wishRate.val(),wish_url_two_day,wish_result_two_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_two_day.change(function () {
		changeNumWC(order_url_two_day.val(),order_ad_two_day.val(),order_result_two_day.val(),
				crate.val(),wishRate.val(),wish_result_two_day,wish_url_two_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_url_three_day.change(function () {
		changeNumWC(order_url_three_day.val(),order_ad_three_day.val(),order_result_three_day.val(),
				crate.val(),wishRate.val(),wish_url_three_day,wish_result_three_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_three_day.change(function () {
		changeNumWC(order_url_three_day.val(),order_ad_three_day.val(),order_result_three_day.val(),
				crate.val(),wishRate.val(),wish_result_three_day,wish_url_three_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_url_four_day.change(function () {
		changeNumWC(order_url_four_day.val(),order_ad_four_day.val(),order_result_four_day.val(),
				crate.val(),wishRate.val(),wish_url_four_day,wish_result_four_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_four_day.change(function () {
		changeNumWC(order_url_four_day.val(),order_ad_four_day.val(),order_result_four_day.val(),
				crate.val(),wishRate.val(),wish_result_four_day,wish_url_four_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_url_five_day.change(function () {
		changeNumWC(order_url_five_day.val(),order_ad_five_day.val(),order_result_five_day.val(),
				crate.val(),wishRate.val(),wish_url_five_day,wish_result_five_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_five_day.change(function () {
		changeNumWC(order_url_five_day.val(),order_ad_five_day.val(),order_result_five_day.val(),
				crate.val(),wishRate.val(),wish_result_five_day,wish_url_five_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_url_six_day.change(function () {
		changeNumWC(order_url_six_day.val(),order_ad_six_day.val(),order_result_six_day.val(),
				crate.val(),wishRate.val(),wish_url_six_day,wish_result_six_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_six_day.change(function () {
		changeNumWC(order_url_six_day.val(),order_ad_six_day.val(),order_result_six_day.val(),
				crate.val(),wishRate.val(),wish_result_six_day,wish_url_six_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_url_seven_day.change(function () {
		changeNumWC(order_url_seven_day.val(),order_ad_seven_day.val(),order_result_seven_day.val(),
				crate.val(),wishRate.val(),wish_url_seven_day,wish_result_seven_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_seven_day.change(function () {
		changeNumWC(order_url_seven_day.val(),order_ad_seven_day.val(),order_result_seven_day.val(),
				crate.val(),wishRate.val(),wish_result_seven_day,wish_url_seven_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_url_eight_day.change(function () {
		changeNumWC(order_url_eight_day.val(),order_ad_eight_day.val(),order_result_eight_day.val(),
				crate.val(),wishRate.val(),wish_url_eight_day,wish_result_eight_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_eight_day.change(function () {
		changeNumWC(order_url_eight_day.val(),order_ad_eight_day.val(),order_result_eight_day.val(),
				crate.val(),wishRate.val(),wish_result_eight_day,wish_url_eight_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_url_nine_day.change(function () {
		changeNumWC(order_url_nine_day.val(),order_ad_nine_day.val(),order_result_nine_day.val(),
				crate.val(),wishRate.val(),wish_url_nine_day,wish_result_nine_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_nine_day.change(function () {
		changeNumWC(order_url_nine_day.val(),order_ad_nine_day.val(),order_result_nine_day.val(),
				crate.val(),wishRate.val(),wish_result_nine_day,wish_url_nine_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_url_ten_day.change(function () {
		changeNumWC(order_url_ten_day.val(),order_ad_ten_day.val(),order_result_ten_day.val(),
				crate.val(),wishRate.val(),wish_url_ten_day,wish_result_ten_day);
		wishUrlsun();
		wishResultsun();
	});
	wish_result_ten_day.change(function () {
		changeNumWC(order_url_ten_day.val(),order_ad_ten_day.val(),order_result_ten_day.val(),
				crate.val(),wishRate.val(),wish_result_ten_day,wish_url_ten_day);
		wishUrlsun();
		wishResultsun();
	});
	
});

//加入购物车并收藏页面--加减
$(function() {
	cart_url_one_day.change(function () {
		changeNumWC(order_url_one_day.val(),order_ad_one_day.val(),order_result_one_day.val(),
				crate.val(),cartRate.val(),cart_url_one_day,cart_result_one_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_one_day.change(function () {
		changeNumWC(order_url_one_day.val(),order_ad_one_day.val(),order_result_one_day.val(),
				crate.val(),cartRate.val(),cart_result_one_day,cart_url_one_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_url_two_day.change(function () {
		changeNumWC(order_url_two_day.val(),order_ad_two_day.val(),order_result_two_day.val(),
				crate.val(),cartRate.val(),cart_url_two_day,cart_result_two_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_two_day.change(function () {
		changeNumWC(order_url_two_day.val(),order_ad_two_day.val(),order_result_two_day.val(),
				crate.val(),cartRate.val(),cart_result_two_day,cart_url_two_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_url_three_day.change(function () {
		changeNumWC(order_url_three_day.val(),order_ad_three_day.val(),order_result_three_day.val(),
				crate.val(),cartRate.val(),cart_url_three_day,cart_result_three_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_three_day.change(function () {
		changeNumWC(order_url_three_day.val(),order_ad_three_day.val(),order_result_three_day.val(),
				crate.val(),cartRate.val(),cart_result_three_day,cart_url_three_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_url_four_day.change(function () {
		changeNumWC(order_url_four_day.val(),order_ad_four_day.val(),order_result_four_day.val(),
				crate.val(),cartRate.val(),cart_url_four_day,cart_result_four_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_four_day.change(function () {
		changeNumWC(order_url_four_day.val(),order_ad_four_day.val(),order_result_four_day.val(),
				crate.val(),cartRate.val(),cart_result_four_day,cart_url_four_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_url_five_day.change(function () {
		changeNumWC(order_url_five_day.val(),order_ad_five_day.val(),order_result_five_day.val(),
				crate.val(),cartRate.val(),cart_url_five_day,cart_result_five_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_five_day.change(function () {
		changeNumWC(order_url_five_day.val(),order_ad_five_day.val(),order_result_five_day.val(),
				crate.val(),cartRate.val(),cart_result_five_day,cart_url_five_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_url_six_day.change(function () {
		changeNumWC(order_url_six_day.val(),order_ad_six_day.val(),order_result_six_day.val(),
				crate.val(),cartRate.val(),cart_url_six_day,cart_result_six_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_six_day.change(function () {
		changeNumWC(order_url_six_day.val(),order_ad_six_day.val(),order_result_six_day.val(),
				crate.val(),cartRate.val(),cart_result_six_day,cart_url_six_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_url_seven_day.change(function () {
		changeNumWC(order_url_seven_day.val(),order_ad_seven_day.val(),order_result_seven_day.val(),
				crate.val(),cartRate.val(),cart_url_seven_day,cart_result_seven_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_seven_day.change(function () {
		changeNumWC(order_url_seven_day.val(),order_ad_seven_day.val(),order_result_seven_day.val(),
				crate.val(),cartRate.val(),cart_result_seven_day,cart_url_seven_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_url_eight_day.change(function () {
		changeNumWC(order_url_eight_day.val(),order_ad_eight_day.val(),order_result_eight_day.val(),
				crate.val(),cartRate.val(),cart_url_eight_day,cart_result_eight_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_eight_day.change(function () {
		changeNumWC(order_url_eight_day.val(),order_ad_eight_day.val(),order_result_eight_day.val(),
				crate.val(),cartRate.val(),cart_result_eight_day,cart_url_eight_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_url_nine_day.change(function () {
		changeNumWC(order_url_nine_day.val(),order_ad_nine_day.val(),order_result_nine_day.val(),
				crate.val(),cartRate.val(),cart_url_nine_day,cart_result_nine_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_nine_day.change(function () {
		changeNumWC(order_url_nine_day.val(),order_ad_nine_day.val(),order_result_nine_day.val(),
				crate.val(),cartRate.val(),cart_result_nine_day,cart_url_nine_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_url_ten_day.change(function () {
		changeNumWC(order_url_ten_day.val(),order_ad_ten_day.val(),order_result_ten_day.val(),
				crate.val(),cartRate.val(),cart_url_ten_day,cart_result_ten_day);
		cartUrlsun();
		cartResultsun();
	});
	cart_result_ten_day.change(function () {
		changeNumWC(order_url_ten_day.val(),order_ad_ten_day.val(),order_result_ten_day.val(),
				crate.val(),cartRate.val(),cart_result_ten_day,cart_url_ten_day);
		cartUrlsun();
		cartResultsun();
	});
});

//order--选择框事件
function orderChange(){
	sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
			wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
			wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
			wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
			wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
			wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
			wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
			wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
			wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
			wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
			wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	flowUrlsun();
	flowResultsun();
	wishUrlsun();
	wishResultsun();
	cartUrlsun();
	cartResultsun();
};
//流量--选择框事件
function flowChange(){
	sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
			wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
			wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
			wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
			wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
			wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
			wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
			wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
			wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
			wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
			wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	flowUrlsun();
	flowResultsun();
	wishUrlsun();
	wishResultsun();
	cartUrlsun();
	cartResultsun();
};

//加入愿望清单--选择框事件
function wishChange(){
	sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
			wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
			wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
			wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
			wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
			wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
			wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
			wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
			wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
			wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
			wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	flowUrlsun();
	flowResultsun();
	wishUrlsun();
	wishResultsun();
	cartUrlsun();
	cartResultsun();
};

//加入购物车并收藏页面--选择框事件
function cartChange(){
	sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
			wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
			wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
			wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
			wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
			wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
			wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
			wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
			wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
			wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
			wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	flowUrlsun();
	flowResultsun();
	wishUrlsun();
	wishResultsun();
	cartUrlsun();
	cartResultsun();
};
/*
 * 流量--目标转换率 change事件
 */
function crateChange(){
	sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
			wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
			wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
			wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
			wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
			wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
			wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
			wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
			wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
			wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
			wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	flowUrlsun();
	flowResultsun();
	wishUrlsun();
	wishResultsun();
	cartUrlsun();
	cartResultsun();
}

/*
 * 加入愿望清单--比率 change事件
 */
function wishRateChange(){
	sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
			wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
			wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
			wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
			wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
			wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
			wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
			wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
			wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
			wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
			wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	flowUrlsun();
	flowResultsun();
	wishUrlsun();
	wishResultsun();
	cartUrlsun();
	cartResultsun();
}
/*
 * 加入购物车并收藏页面--比率 change事件
 */
function cartRateChange(){
	sun(flow_url_one_day,order_url_one_day,order_ad_one_day,order_result_one_day,flow_result_one_day,
			wish_url_one_day,wish_result_one_day,cart_url_one_day,cart_result_one_day);
	sun(flow_url_two_day,order_url_two_day,order_ad_two_day,order_result_two_day,flow_result_two_day,
			wish_url_two_day,wish_result_two_day,cart_url_two_day,cart_result_two_day);
	sun(flow_url_three_day,order_url_three_day,order_ad_three_day,order_result_three_day,flow_result_three_day,
			wish_url_three_day,wish_result_three_day,cart_url_three_day,cart_result_three_day);
	sun(flow_url_four_day,order_url_four_day,order_ad_four_day,order_result_four_day,flow_result_four_day,
			wish_url_four_day,wish_result_four_day,cart_url_four_day,cart_result_four_day);
	sun(flow_url_five_day,order_url_five_day,order_ad_five_day,order_result_five_day,flow_result_five_day,
			wish_url_five_day,wish_result_five_day,cart_url_five_day,cart_result_five_day);
	sun(flow_url_six_day,order_url_six_day,order_ad_six_day,order_result_six_day,flow_result_six_day,
			wish_url_six_day,wish_result_six_day,cart_url_six_day,cart_result_six_day);
	sun(flow_url_seven_day,order_url_seven_day,order_ad_seven_day,order_result_seven_day,flow_result_seven_day,
			wish_url_seven_day,wish_result_seven_day,cart_url_seven_day,cart_result_seven_day);
	sun(flow_url_eight_day,order_url_eight_day,order_ad_eight_day,order_result_eight_day,flow_result_eight_day,
			wish_url_eight_day,wish_result_eight_day,cart_url_eight_day,cart_result_eight_day);
	sun(flow_url_nine_day,order_url_nine_day,order_ad_nine_day,order_result_nine_day,flow_result_nine_day,
			wish_url_nine_day,wish_result_nine_day,cart_url_nine_day,cart_result_nine_day);
	sun(flow_url_ten_day,order_url_ten_day,order_ad_ten_day,order_result_ten_day,flow_result_ten_day,
			wish_url_ten_day,wish_result_ten_day,cart_url_ten_day,cart_result_ten_day);
	flowUrlsun();
	flowResultsun();
	wishUrlsun();
	wishResultsun();
	cartUrlsun();
	cartResultsun();
}
/*
 * order提供跟踪号---超级链接-计算【总数量】【总手续费】
 */
function sun(fu1,o1,o2,o3,fr1,wu1,wr1,cu1,cr1){
	//超级链接-计算【总数量】【总手续费】
	order_url_day_sun.val(sunDay(order_url_one_day.val(),order_url_two_day.val(), 
			order_url_three_day.val(), order_url_four_day.val(),
			order_url_five_day.val(), order_url_six_day.val(),
			order_url_seven_day.val(), order_url_eight_day.val(),
			order_url_nine_day.val(), order_url_ten_day.val()));
	order_url_sun.val(sunHand(order_url_day_sun.val(),order_url_charge.val(),1));
	//搜索广告-计算【总数量】【总手续费】
	order_ad_day_sun.val(sunDay(order_ad_one_day.val(),order_ad_two_day.val(), 
			order_ad_three_day.val(), order_ad_four_day.val(),
			order_ad_five_day.val(), order_ad_six_day.val(),
			order_ad_seven_day.val(), order_ad_eight_day.val(),
			order_ad_nine_day.val(), order_ad_ten_day.val()));
	order_ad_sun.val(sunHand(order_ad_day_sun.val(),order_ad_charge.val(),1));
	//搜索结果-计算【总数量】【总手续费】
	order_result_day_sun.val(sunDay(order_result_one_day.val(),order_result_two_day.val(), 
			order_result_three_day.val(), order_result_four_day.val(),
			order_result_five_day.val(), order_result_six_day.val(),
			order_result_seven_day.val(), order_result_eight_day.val(),
			order_result_nine_day.val(), order_result_ten_day.val()));
	order_result_sun.val(sunHand(order_result_day_sun.val(),order_result_charge.val(),1));
	reviewSun();
	feedbackSun();
	flowUrlsun();
	flowResultsun();
	wishUrlsun();
	wishResultsun();
	cartUrlsun();
	cartResultsun();
	//产品代付数量
	proNum.val(sunNum(order_url_day_sun.val(),order_ad_day_sun.val(),order_result_day_sun.val()));
	//总额
	rentalNum.val(renNum(pro_price.val(),p_price.val(),order_url_day_sun.val(),order_ad_day_sun.val(),order_result_day_sun.val()));
	
	
	//判断目标转换率是否选中时的情况
	if($('#flow').is(':checked')) {
		fu1.val(sunL(o1.val(),o2.val(),o3.val(),crate.val(),0.8));
		fr1.val(sunL(o1.val(),o2.val(),o3.val(),crate.val(),0.2));
		if($('#wish').is(':checked')){
			wu1.val(sunHope(o1.val(),o2.val(),o3.val(),crate.val(),0.8,wishRate.val()));
			wr1.val(sunHope(o1.val(),o2.val(),o3.val(),crate.val(),0.2,wishRate.val()));
			wishUrlsun();
			wishResultsun();
		}else{
			wishZero();
		}
		if($('#cart').is(':checked')){
			cu1.val(sunHope(o1.val(),o2.val(),o3.val(),crate.val(),0.8,cartRate.val()));
			cr1.val(sunHope(o1.val(),o2.val(),o3.val(),crate.val(),0.2,cartRate.val()));
		}else{
			cartZero();
		}
		
		flowUrlsun();
		flowResultsun();
		wishUrlsun();
		wishResultsun();
		cartUrlsun();
		cartResultsun();
	}else{
		flowZero();
		if($('#wish').is(':checked')){
			wu1.val(sunHope(o1.val(),o2.val(),o3.val(),10,0.8,wishRate.val()));
			wr1.val(sunHope(o1.val(),o2.val(),o3.val(),10,0.2,wishRate.val()));
		}else{
			wishZero();
		}
		if($('#cart').is(':checked')){
			cu1.val(sunHope(o1.val(),o2.val(),o3.val(),10,0.8,cartRate.val()));
			cr1.val(sunHope(o1.val(),o2.val(),o3.val(),10,0.2,cartRate.val()));
		}else{
			cartZero();
		}
		wishUrlsun();
		wishResultsun();
		cartUrlsun();
		cartResultsun();
	}
	flowUrlsun();
	flowResultsun();
	//代购手续费总额
	procedureNum.val(proceNum(order_url_sun.val(),order_ad_sun.val(),order_result_sun.val(),
			review_sun.val(),feedback_sun.val(),flow_url_sun.val(),
			flow_result_sun.val(),wish_url_sun.val(),wish_result_sun.val(),
			cart_url_sun.val(),cart_result_sun.val()));
	//总支付金额
	payNum.val(sunTotal(rentalNum.val(),procedureNum.val()));
}

//流量全部重置为0
function flowZero(){
	flow_url_one_day.val("");flow_url_two_day.val(""); 
	flow_url_three_day.val(""); flow_url_four_day.val(""),
	flow_url_five_day.val(""); flow_url_six_day.val("");
	flow_url_seven_day.val(""); flow_url_eight_day.val("");
	flow_url_nine_day.val(""); flow_url_ten_day.val("");
	flow_url_day_sun.val("");flow_url_sun.val("");
	
	flow_result_one_day.val("");flow_result_two_day.val(""); 
	flow_result_three_day.val(""); flow_result_four_day.val("");
	flow_result_five_day.val(""); flow_result_six_day.val("");
	flow_result_seven_day.val(""); flow_result_eight_day.val("");
	flow_result_nine_day.val(""); flow_result_ten_day.val("");
	flow_result_day_sun.val("");flow_result_sun.val("");
}
//加入愿望清单全部重置为0
function wishZero(){
	wish_url_one_day.val("");wish_url_two_day.val(""); 
	wish_url_three_day.val(""); wish_url_four_day.val(""),
	wish_url_five_day.val(""); wish_url_six_day.val("");
	wish_url_seven_day.val(""); wish_url_eight_day.val("");
	wish_url_nine_day.val(""); wish_url_ten_day.val("");
	wish_url_day_sun.val("");wish_url_sun.val("");
	
	wish_result_one_day.val("");wish_result_two_day.val(""); 
	wish_result_three_day.val(""); wish_result_four_day.val("");
	wish_result_five_day.val(""); wish_result_six_day.val("");
	wish_result_seven_day.val(""); wish_result_eight_day.val("");
	wish_result_nine_day.val(""); wish_result_ten_day.val("");
	wish_result_day_sun.val("");wish_result_sun.val("");
}
//加入购物车并收藏页面全部重置为0
function cartZero(){
	cart_url_one_day.val("");cart_url_two_day.val(""); 
	cart_url_three_day.val(""); cart_url_four_day.val(""),
	cart_url_five_day.val(""); cart_url_six_day.val("");
	cart_url_seven_day.val(""); cart_url_eight_day.val("");
	cart_url_nine_day.val(""); cart_url_ten_day.val("");
	cart_url_day_sun.val("");cart_url_sun.val("");
	
	cart_result_one_day.val("");cart_result_two_day.val(""); 
	cart_result_three_day.val(""); cart_result_four_day.val("");
	cart_result_five_day.val(""); cart_result_six_day.val("");
	cart_result_seven_day.val(""); cart_result_eight_day.val("");
	cart_result_nine_day.val(""); cart_result_ten_day.val("");
	cart_result_day_sun.val("");cart_result_sun.val("");
}

/*
 * REVIEW数量
 */
function reviewSun(){
	review_day_sun.val(sunDay(review_one_day.val(),review_two_day.val(), 
			review_three_day.val(), review_four_day.val(),
			review_five_day.val(), review_six_day.val(),
			review_seven_day.val(), review_eight_day.val(),
			review_nine_day.val(), review_ten_day.val()));
	review_sun.val(sunHand(review_day_sun.val(),review_charge.val(),2));
}
/*
 * FEEDBACK数量---计算【总数量】【总手续费】
 */
function feedbackSun(){
	feedback_day_sun.val(sunDay(feedback_one_day.val(),feedback_two_day.val(), 
			feedback_three_day.val(), feedback_four_day.val(),
			feedback_five_day.val(), feedback_six_day.val(),
			feedback_seven_day.val(), feedback_eight_day.val(),
			feedback_nine_day.val(), feedback_ten_day.val()));
	feedback_sun.val(sunHand(feedback_day_sun.val(),feedback_charge.val(),2));
}
/*
 * 流量---超级链接-计算值
 */
function flowUrlsun(){
	flow_url_day_sun.val(sunDay(flow_url_one_day.val(),flow_url_two_day.val(), 
			flow_url_three_day.val(), flow_url_four_day.val(),
			flow_url_five_day.val(), flow_url_six_day.val(),
			flow_url_seven_day.val(), flow_url_eight_day.val(),
			flow_url_nine_day.val(), flow_url_ten_day.val()));
	flow_url_sun.val(sunHand(flow_url_day_sun.val(),flow_url_charge.val(),2));
}
/*
 * 流量---搜索结果-计算值
 */
function flowResultsun(){
	flow_result_day_sun.val(sunDay(flow_result_one_day.val(),flow_result_two_day.val(), 
			flow_result_three_day.val(), flow_result_four_day.val(),
			flow_result_five_day.val(), flow_result_six_day.val(),
			flow_result_seven_day.val(), flow_result_eight_day.val(),
			flow_result_nine_day.val(), flow_result_ten_day.val()));
	flow_result_sun.val(sunHand(flow_result_day_sun.val(),flow_result_charge.val(),2));
}

/*
 * 加入愿望清单---超级链接-计算值
 */
function wishUrlsun(){
	wish_url_day_sun.val(sunDay(wish_url_one_day.val(),wish_url_two_day.val(), 
			wish_url_three_day.val(), wish_url_four_day.val(),
			wish_url_five_day.val(), wish_url_six_day.val(),
			wish_url_seven_day.val(), wish_url_eight_day.val(),
			wish_url_nine_day.val(), wish_url_ten_day.val()));
	wish_url_sun.val(sunHand(wish_url_day_sun.val(),wish_url_charge.val(),2));
}
/*
 * 加入愿望清单---搜索结果-计算值
 */
function wishResultsun(){
	wish_result_day_sun.val(sunDay(wish_result_one_day.val(),wish_result_two_day.val(), 
			wish_result_three_day.val(), wish_result_four_day.val(),
			wish_result_five_day.val(), wish_result_six_day.val(),
			wish_result_seven_day.val(), wish_result_eight_day.val(),
			wish_result_nine_day.val(), wish_result_ten_day.val()));
	wish_result_sun.val(sunHand(wish_result_day_sun.val(),wish_result_charge.val(),2));
}

/*
 * 加入购物车并收藏页面---超级链接-计算值
 */
function cartUrlsun(){
	cart_url_day_sun.val(sunDay(cart_url_one_day.val(),cart_url_two_day.val(), 
			cart_url_three_day.val(), cart_url_four_day.val(),
			cart_url_five_day.val(), cart_url_six_day.val(),
			cart_url_seven_day.val(), cart_url_eight_day.val(),
			cart_url_nine_day.val(), cart_url_ten_day.val()));
	cart_url_sun.val(sunHand(cart_url_day_sun.val(),cart_url_charge.val(),2));
}
/*
 * 加入购物车并收藏页面---搜索结果-计算值
 */
function cartResultsun(){
	cart_result_day_sun.val(sunDay(cart_result_one_day.val(),cart_result_two_day.val(), 
			cart_result_three_day.val(), cart_result_four_day.val(),
			cart_result_five_day.val(), cart_result_six_day.val(),
			cart_result_seven_day.val(), cart_result_eight_day.val(),
			cart_result_nine_day.val(), cart_result_ten_day.val()));
	cart_result_sun.val(sunHand(cart_result_day_sun.val(),cart_result_charge.val(),2));
}


/**===============================================order提供跟踪号 and 流量=========end==================================================*/






/**===============================================REVIEW数量=========start==================================================*/

/**
 * REVIEW数量
 */
var review_one_day = $("input[name='review_one_day']");
var review_two_day = $("input[name='review_two_day']");
var review_three_day = $("input[name='review_three_day']");
var review_four_day = $("input[name='review_four_day']");
var review_five_day = $("input[name='review_five_day']");
var review_six_day = $("input[name='review_six_day']");
var review_seven_day = $("input[name='review_seven_day']");
var review_eight_day = $("input[name='review_eight_day']");
var review_nine_day = $("input[name='review_nine_day']");
var review_ten_day = $("input[name='review_ten_day']");
/*REVIEW数量--单笔手续费*/
var review_charge = $("input[name='review_charge']");
/*REVIEW数量--总数量*/
var review_day_sun = $("input[name='review_day_sun']");
/*REVIEW数量--总手续费*/
var review_sun = $("input[name='review_sun']");


$(function() {
	review_one_day.change(function() {
		sun();
	});
	review_two_day.change(function() {
		sun();
	});
	review_three_day.change(function() {
		sun();
	});
	review_four_day.change(function() {
		sun();
	});
	review_five_day.change(function() {
		sun();
	});
	review_six_day.change(function() {
		sun();
	});
	review_seven_day.change(function() {
		sun();
	});
	review_eight_day.change(function() {
		sun();
	});
	review_nine_day.change(function() {
		sun();
	});
	review_ten_day.change(function() {
		sun();
	});
	
	/*
	 * REVIEW数量---计算【总数量】【总手续费】
	 */
	function sun(){
		review_day_sun.val(sunDay(review_one_day.val(),review_two_day.val(), 
				review_three_day.val(), review_four_day.val(),
				review_five_day.val(), review_six_day.val(),
				review_seven_day.val(), review_eight_day.val(),
				review_nine_day.val(), review_ten_day.val()));
		review_sun.val(sunHand(review_day_sun.val(),review_charge.val(),2));
	}

});
/**===============================================REVIEW数量=========end==================================================*/





/**===============================================FEEDBACK数量=========start==================================================*/

/**
 * FEEDBACK数量
 */
var feedback_one_day = $("input[name='feedback_one_day']");
var feedback_two_day = $("input[name='feedback_two_day']");
var feedback_three_day = $("input[name='feedback_three_day']");
var feedback_four_day = $("input[name='feedback_four_day']");
var feedback_five_day = $("input[name='feedback_five_day']");
var feedback_six_day = $("input[name='feedback_six_day']");
var feedback_seven_day = $("input[name='feedback_seven_day']");
var feedback_eight_day = $("input[name='feedback_eight_day']");
var feedback_nine_day = $("input[name='feedback_nine_day']");
var feedback_ten_day = $("input[name='feedback_ten_day']");
/*FEEDBACK数量--单笔手续费*/
var feedback_charge = $("input[name='feedback_charge']");
/*FEEDBACK数量--总数量*/
var feedback_day_sun = $("input[name='feedback_day_sun']");
/*FEEDBACK数量--总手续费*/
var feedback_sun = $("input[name='feedback_sun']");


$(function() {
	feedback_one_day.change(function() {
		sun();
	});
	feedback_two_day.change(function() {
		sun();
	});
	feedback_three_day.change(function() {
		sun();
	});
	feedback_four_day.change(function() {
		sun();
	});
	feedback_five_day.change(function() {
		sun();
	});
	feedback_six_day.change(function() {
		sun();
	});
	feedback_seven_day.change(function() {
		sun();
	});
	feedback_eight_day.change(function() {
		sun();
	});
	feedback_nine_day.change(function() {
		sun();
	});
	feedback_ten_day.change(function() {
		sun();
	});
	
	/*
	 * FEEDBACK数量---计算【总数量】【总手续费】
	 */
	function sun(){
		feedback_day_sun.val(sunDay(feedback_one_day.val(),feedback_two_day.val(), 
				feedback_three_day.val(), feedback_four_day.val(),
				feedback_five_day.val(), feedback_six_day.val(),
				feedback_seven_day.val(), feedback_eight_day.val(),
				feedback_nine_day.val(), feedback_ten_day.val()));
		feedback_sun.val(sunHand(feedback_day_sun.val(),feedback_charge.val(),2));
	}

});
/**===============================================FEEDBACK数量=========end==================================================*/





/*
 * 计算【总数量】的方法
 */
function sunDay(a, b, c, d, e, f, g, j, k, n) {
	/*isNan: 不是数字*/
	if(isNaN(a)){
		a = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	if(isNaN(c)){
		c = 0;
	}
	if(isNaN(d)){
		d = 0;
	}
	if(isNaN(e)){
		e = 0;
	}
	if(isNaN(f)){
		f = 0;
	}
	if(isNaN(g)){
		g = 0;
	}
	if(isNaN(j)){
		j = 0;
	}
	if(isNaN(k)){
		k = 0;
	}
	if(isNaN(n)){
		n = 0;
	}
	
	return a*1 + b*1+ c*1 + d*1 + e*1 + f*1 + g*1 + j*1 + k*1 + n*1;
}

/*
 * 计算【总手续费】的方法
 * 总数量 * 单笔手续费
 * c: 1  表示前面3行： 2 : 表示其它行
 */

function sunHand(a,b,c){
	
	if(isNaN(a)){
		a = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	//alert($('#order').attr('checked'));
    if($('#order').is(':checked') && c==1){
    	$("input[name='order']").val("1");
    	$("#order_check").val("1");
		b = b*1 + 2;
	}else{
		$("input[name='order']").val("0");
		b = b*1;
		$("#order_check").val("0");
	}
	return (a*1) * (b*1) ;
}
/*
 * 计算【流量】数量的方法：
 * (1)按超级链接进入  ：  订单数量 / 目标转换率 * 0.8  
 * (2)按搜索结果进入： 订单数量/ 目标转换率 * 0.2 
 * e  (0.8/0.2)
 */
function sunL(a,b,c,d,e){
	if(isNaN(a)){
		a = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	if(isNaN(c)){
		c = 0;
	}
	if(isNaN(d)){
		d = 1;
	}
	if(isNaN(e)){
		e = 0;
	}
	return Math.round((a*1 + b*1 + c*1)/(d*0.01) * (e*1));
}

/*
 * 	计算   【加入愿望清单、加入购物车并收藏页面】  数量的方法
 *  如果用户选择了流量：(没有选择，目标转换率为10%) 
 *  (1)按超级链接进入:  订单数量 / 目标转换率 * 0.8 * 比率 
 *  (2)按搜索结果进入:  订单数量 / 目标转换率 * 0.2 * 比率
 * */
function sunHope(a,b,c,e,f,g){
	if(isNaN(a)){
		a = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	if(isNaN(c)){
		c = 1;
	}
	if(isNaN(e)){
		e = 0;
	}
	if(isNaN(f)){
		f = 0;
	}
	if(isNaN(g)){
		g = 0;
	}
//	alert((a*1 + b*1 + c*1)/(c*0.01) * (f*1) * (g*0.01));
	return Math.round((a*1 + b*1 + c*1)/(e*0.01) * (f*1) * (g*0.01));
}

/*
 * 计算产品代付数量
 * 超级链接进入+搜索广告进入+搜索结果进入
 */
function sunNum(a,b,c){
	if(isNaN(a)){
		a = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	if(isNaN(c)){
		c = 0;
	}
	return a*1 + b*1 + c*1;
}

/*
 * 计算总额
 * (产品单价+运费)*订单数量（超级链接进入+搜索广告进入+搜索结果进入）
 */
function renNum(a,b,c,m,n){
	if(isNaN(a)){
		a = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	if(isNaN(c)){
		c = 0;
	}
	if(isNaN(m)){
		m = 0;
	}
	if(isNaN(n)){
		n = 0;
	}
	
	return (a*1 + b*1) * (c*1 + m*1 + n*1);
}

/*
 * 代购手续费总额
 * (产品单价+运费)*订单数量（超级链接进入+搜索广告进入+搜索结果进入）
 */
function proceNum(a,b,c,d,e,f,g,h,i,j,k){
	if(isNaN(a)){
		a = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	if(isNaN(c)){
		c = 0;
	}
	if(isNaN(d)){
		d = 0;
	}
	if(isNaN(e)){
		e = 0;
	}
	if(isNaN(f)){
		f = 0;
	}
	if(isNaN(g)){
		g = 0;
	}
	if(isNaN(h)){
		h = 0;
	}
	if(isNaN(i)){
		i = 0;
	}
	if(isNaN(j)){
		j = 0;
	}
	if(isNaN(k)){
		k = 0;
	}
	if($('#rdocM').is(':checked')){
		return ((a*1 + b*1 + c*1 + d*1 + e*1 + f*1 + g*1 + h*1 + i*1 + j*1 + k*1) * 6.5).toFixed(2);
	}else if($('#rdocD').is(':checked')){
		return ((a*1 + b*1 + c*1 + d*1 + e*1 + f*1 + g*1 + h*1 + i*1 + j*1 + k*1) * 3.7).toFixed(2);
	}else{
		return ((a*1 + b*1 + c*1 + d*1 + e*1 + f*1 + g*1 + h*1 + i*1 + j*1 + k*1) * 9.6).toFixed(2);
	}
	
}

/*
 * 计算 【总支付金额】
 * (产品单价+运费)*订单数量（超级链接进入+搜索广告进入+搜索结果进入） + 总手续费
 * 
 * 总额 + 代付总手续费
 */
function sunTotal(a,b){
	if(isNaN(a)){
		a = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	
	
	if($('#rdocM').is(':checked')){
		return (a*6.5+ b*1).toFixed(2);
	}else if($('#rdocD').is(':checked')){
		return (a*3.7+ b*1).toFixed(2);
	}else{
		return (a*9.6+ b*1).toFixed(2);
	}
	
}

/*
 * 流量输入框改变事件
 *  a1+a2+a3 : 订单数量（超级链接进入+搜索广告进入+搜索结果进入）
 *  b : 目标转换率
 *  c: 按超级链接进入
 *  d: 按搜索结果进入
 *  
 *   or
 *   
 *   a1+a2+a3 : 订单数量（超级链接进入+搜索广告进入+搜索结果进入）
 *  b : 目标转换率
 *  c: 按搜索结果进入
 *  d: 按超级链接进入
 *  
 * */
function changeNum(a1,a2,a3,b,c,d){
	if(isNaN(a1)){
		a1 = 0;
	}
	if(isNaN(a2)){
		a2 = 0;
	}
	if(isNaN(a3)){
		a3 = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	if(isNaN(c.val())){
		c.val(0);
		d.val((a1*1 + a2*1 + a3*1) / (b*0.01));
	}else{
		if(c.val() >= ((a1*1 + a2*1 + a3*1) / (b*0.01))){
			c.val((a1*1 + a2*1 + a3*1) / (b*0.01));
			d.val(0);
		}else{
			d.val((a1*1 + a2*1 + a3*1) / (b*0.01) - (c.val()*1)) ;
		}
	}
	
}


/*
 * 加入愿望清单、加入购物车并收藏页面   输入框  改变事件
 *  a1+a2+a3 : 订单数量（超级链接进入+搜索广告进入+搜索结果进入）
 *  b : 目标转换率
 *  c: 0.8/0.2
 *  d:比率
 *  e：按搜索结果进入/按超级链接进入
 *  
 * */
function changeNumWC(a1,a2,a3,b,c,d,e){
	if(isNaN(a1)){
		a1 = 0;
	}
	if(isNaN(a2)){
		a2 = 0;
	}
	if(isNaN(a3)) {
		a3 = 0;
	}
	if(isNaN(b)){
		b = 0;
	}
	if(isNaN(c)){
		c = 0;
	}
	
	if($('#flow').is(':checked')){
		if(isNaN(d.val())){
			d.val(0);
			e.val(Math.round((a1*1 + a2*1 + a3*1) / (b*0.01) * (c*0.01)));
		}else{
			if(d.val() >= Math.round((a1*1 + a2*1 + a3*1) / (b*0.01) * (c*0.01)) ){
				d.val(Math.round((a1*1 + a2*1 + a3*1) / (b*0.01) * (c*0.01)));
				e.val(0);
			}else{
				e.val(Math.round((a1*1 + a2*1 + a3*1) / (b*0.01) * (c*0.01) - (d.val()*1))) ;
			}
		}
	} else{
		if(isNaN(d.val())){
			d.val(0);
			e.val(Math.round((a1*1 + a2*1 + a3*1) / (10*0.01) * (c*0.01)));
		}else{
			if(d.val() >= Math.round((a1*1 + a2*1 + a3*1) / (10*0.01) * (c*0.01)) ){
				d.val(Math.round((a1*1 + a2*1 + a3*1) / (10*0.01) * (c*0.01)));
				e.val(0);
			}else{
				e.val(Math.round((a1*1 + a2*1 + a3*1) / (10*0.01) * (c*0.01) - (d.val()*1))) ;
			}
		}
	}
	
	
}

  


